package com.xzq.erp.domain.dto;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotEmpty;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.util.List;

@Data
public class ProductDTO {

    private Long id;

    @NotBlank(message = "商品名称不能为空")
    private String name;

    @NotNull(message = "商品分类不能为空")
    private Long categoryId;

    @NotNull(message = "商品品牌不能为空")
    private Long brandId;

    @NotNull(message = "商品供应商不能为空")
    private Long supplierId;

    @NotNull(message = "商品计量单位不能为空")
    private Long unitId;

    @NotNull(message = "商品产地不能为空")
    private Long originId;

    @NotEmpty(message = "商品仓库不能为空")
    private List<Long> warehouseId;

    private String color;

    private String image;

    private String album;

    @NotNull(message = "商品进价不能为空")
    private BigDecimal purchasePrice;

    @NotNull(message = "商品售价不能为空")
    private BigDecimal sellingPrice;

    @NotNull(message = "会员价不能为空")
    private BigDecimal memberPrice;

    @NotNull(message = "商品库存不能为空")
    private Integer stock;

    private String description;

    private LocalDate productionDate;

    private LocalDate shelfLife;
}